{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% extends "base.html" %}
{% load origin %}
{% load django_bootstrap5 textfilters %}
{% block title %}Account creation{% endblock %}
{% block content %}
    {% origin %}
    {% if to_email %}
        <h1>Account request received.</h1>
        <div class="alert alert-success my-3">
            Your account creation request has been successfully received.
            <hr>
            We have sent an email to {{ to_email|linkify }} with instructions on how to complete the process.
        </div>
    {% else %}
        <h1>Account creation</h1>
        <div class="row">
            <div class="col-md-6">
                <div class="alert alert-info my-3">
                    <b>If you already have an account and want to use a new email address</b>, please go to your account profile page and
                    <br>
                    <a class="btn btn-primary mt-3"
                       href="{% url "ietf.ietfauth.views.profile" %}">Add a new email address</a>
                </div>
            </div>
            <div class="col-md-6">
                <div class="alert alert-info my-3">
                    <b>If you already have an account but forgot your password</b>, please simply
                    <br>
                    <a class="btn btn-warning mt-3"
                       href="{% url "ietf.ietfauth.views.password_reset" %}">Reset your password</a>
                </div>
            </div>
        </div>
        <p class="my-3">
            Otherwise, please enter your email address in order to create your datatracker account.
        </p>
        <form method="post">
            {% csrf_token %}
            {% bootstrap_form form %}
            {% bootstrap_button button_type="submit" content="Create account" %}
        </form>
    {% endif %}
{% endblock %}